#include <iostream>
using namespace std;

template <int n=3, class Real>
Real add(Real a)
{
	return (Real)n + a;
}

template<class Real>
struct MyVal{
	Real c;
};

template<int n=3,class Real=double>
struct Add {
	typedef Real		value_type;

	value_type a;
	MyVal<Real> b;
	int m;
	Add() :m(n) {}

	Real operator()(Real b)
	{
		return (Real)m + b;
	}
};

int main()
{
	cout << Add<>()(3.0) << endl;
	return 0;
}